package com.hopu.v1.mapper.admin.classes;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hopu.v1.pojo.classes.Student;
import com.hopu.v1.vo.StudentClassVo;
import org.apache.ibatis.annotations.Param;
import org.mybatis.spring.annotation.MapperScan;

import java.util.List;

/**
* @author admin
* @description 针对表【t_student(学生表)】的数据库操作Mapper
* @createDate 2024-09-26 15:30:32
* @Entity generator.domain.Student
*/
@MapperScan
public interface StudentMapper extends BaseMapper<Student> {

    /**
     * 条件查询
     * @param page
     * @param student
     * @return
     */
    Page<StudentClassVo> selectStudentClassByClassId(Page<Student> page, Student student);

    /**
     * 查询最后一条数据
     * @return
     */
    Student selectLastStudent();

    /**
     * 查询班级的所有考勤
     *
     * @param classId
     * @return
     */
    List<Student> selectAttendance(Integer classId);

    boolean updatePhoneNum(@Param("student") Student student);
}




